package org.tacademy.and12thjyh.ListViewTest;



//import org.tacademy.listviewhw.MyData;



import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.widget.ImageView;
import android.widget.TextView;

public class NameActivity extends Activity {
	public static final String PARAM_NAME = "name";
	public static final String PARAM_MYDATA = "mydata";
	MyData d;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_name);
		Intent i = getIntent();
		d = (MyData) i.getParcelableExtra(PARAM_MYDATA);
		
		((ImageView) findViewById(R.id.imageView1))
		.setImageResource(d.imageId);
((TextView) findViewById(R.id.textView1)).setText(d.title);
((TextView) findViewById(R.id.textView2)).setText(d.description);
	}
	

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_name, menu);
		return true;
	}

}
